package event_impl

import (
	"go_server/game_server/event_manager/event_data"
	"go_server/zinx/ziface"
)

type BuildLevelupEvent struct {
	event_data.AbsEventData
	Level int32
	CfgBuildId int32
}


func NewBuildLevelupEvent(conn ziface.IConnection, level int32,
	cfgBuildId int32) *BuildLevelupEvent {
	event := new(BuildLevelupEvent)
	event.EventType = event_data.BuildLevelupEvent
	event.RoleConn = conn
	event.Level = level
	event.CfgBuildId = cfgBuildId
	return event
}

type BuildUnlockEvent struct {
	event_data.AbsEventData
	BuildMaps map[int32][]int32
}


func NewBuildUnlockEvent(conn ziface.IConnection, buildMaps map[int32][]int32) *BuildUnlockEvent{
	event := new(BuildUnlockEvent)
	event.EventType = event_data.BuildUnlockEvent
	event.RoleConn = conn
	event.BuildMaps = buildMaps
	return event
}


type RepairBuildEvent struct {
	event_data.AbsEventData
	CfgBuildId int32
}


func NewRepairBuildEvent(conn ziface.IConnection, cfgBuildId int32) *RepairBuildEvent{
	event := new(RepairBuildEvent)
	event.EventType = event_data.RepairBuildEvent
	event.RoleConn = conn
	event.CfgBuildId = cfgBuildId
	return event
}

type ExploreBuildEvent struct {
	event_data.AbsEventData
	CfgBuildId int32
}


func NewExploreBuildEvent(conn ziface.IConnection, cfgBuildId int32) *ExploreBuildEvent{
	event := new(ExploreBuildEvent)
	event.EventType = event_data.ExploreBuildEvent
	event.RoleConn = conn
	event.CfgBuildId = cfgBuildId
	return event
}

type RepairWallEvent struct {
	event_data.AbsEventData
	BlockId int32
}


func NewRepairWallEvent(conn ziface.IConnection, blockId int32) *RepairWallEvent{
	event := new(RepairWallEvent)
	event.EventType = event_data.RepairWallEvent
	event.RoleConn = conn
	event.BlockId = blockId
	return event
}

type BuildSpeedUpEvent struct {
	event_data.AbsEventData
	Time int64
}


func NewBuildSpeedUpEvent(conn ziface.IConnection, time int64) *BuildSpeedUpEvent{
	event := new(BuildSpeedUpEvent)
	event.EventType = event_data.BuildSpeedUpEvent
	event.RoleConn = conn
	event.Time = time
	return event
}